Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Adds a few PHP 8.1 related changes #38404

Merged
merged 29 commits into from
Sep 15, 2021
Merged

[8.x] Adds a few PHP 8.1 related changes #38404

merged 29 commits into from
Sep 15, 2021

Conversation

driesvints
Copy link
Member

@driesvints driesvints commented Aug 16, 2021

This PR adds some additional fixes for PHP 8.1 support. Thanks to @GrahamCampbell for his help with this and third party library support.

Todo

@laravel laravel deleted a comment from GrahamCampbell Aug 16, 2021
@driesvints driesvints changed the title [8.x] PHP 8.1 fixes [8.x] More PHP 8.1 fixes Aug 16, 2021
@driesvints driesvints marked this pull request as draft August 16, 2021 16:40
@driesvints driesvints changed the title [8.x] More PHP 8.1 fixes [8.x] PHP 8.1 fixes Aug 16, 2021
@driesvints driesvints force-pushed the php81-fixes branch 4 times, most recently from 38201f0 to d468304 Compare August 30, 2021 14:55
@driesvints driesvints changed the title [8.x] PHP 8.1 fixes [8.x] PHP 8.1 support Sep 2, 2021
composer.json Outdated Show resolved Hide resolved
@GrahamCampbell
Copy link
Member

@kylekatarnls why have you approved a PR in a broken state?

@kylekatarnls
Copy link
Contributor

I would like to see ReturnTypeWillChange merged which should unlock the composer install for Laravel. And I think we could have 1 other PR first to add all the #[ReturnTypeWillChange] then the rest in a second step with conflicts fixed when ready.

@GrahamCampbell
Copy link
Member

It’s not ready yet. It’ll probably be another few weeks, at the earliest. Even if the framework code is ready, it’s dependencies are not all ready, which means it still won’t work in practice.

@kylekatarnls
Copy link
Contributor

I know, I just released a new fix today for Carbon compatibility with PHP 8.1 interfaces that added new return types.

@driesvints
Copy link
Member Author

I would like to see ReturnTypeWillChange merged which should unlock the composer install for Laravel

I can install Laravel v9 just fine right now. Is there anything custom you're doing maybe that's preventing you to do that?

@GrahamCampbell
Copy link
Member

Check into PDO::ATTR_STRINGIFY_FETCHES behavio

I think this is covered now. :)

driesvints and others added 7 commits September 13, 2021 17:20
* Makes serializable closures work with PHP 8.1

* Apply fixes from StyleCI

* Fixes PHP 7.3 tests

* Refactors

* Updates deprecated warning

Co-authored-by: Dries Vints <[email protected]>

* Fixes restoring properties

* Update QueueServiceProvider.php

Co-authored-by: Taylor Otwell <[email protected]>
Co-authored-by: Dries Vints <[email protected]>
Co-authored-by: Taylor Otwell <[email protected]>
@nunomaduro nunomaduro marked this pull request as ready for review September 15, 2021 14:24
@nunomaduro
Copy link
Member

@taylorotwell I've skipped the tests that are currently failing in PHP 8.1, so we can make this pull request in a mergeble state.

@nunomaduro nunomaduro changed the title [8.x] PHP 8.1 support [8.x] Adds a few PHP 8.1 related changes Sep 15, 2021
@taylorotwell taylorotwell merged commit b86e57e into 8.x Sep 15, 2021
@taylorotwell taylorotwell deleted the php81-fixes branch September 15, 2021 14:32
victorvilella pushed a commit to cdsistemas/framework that referenced this pull request Oct 12, 2021
* Add ReturnTypeWillChange to SessionHandlerInterface usages

* Bump commonmark

* Fix getIterator

* Use Symfony 5.4 components

* Dev mockery

* Mimic PHP 8.0

* Try removing symfony components

* Mockery

* Fix type errors in db tests (laravel#38696)

* Fix type errors in db tests

* Apply fixes from StyleCI

Co-authored-by: Taylor Otwell <[email protected]>

* Additional DB test fixes (laravel#38699)

* More DB fixes (laravel#38700)

* PHP 8.1 prefer-lowest builds

* Remove skipping PHP 8.1 builds

* Bump PHPUnit

* Revert "PHP 8.1 prefer-lowest builds"

This reverts commit d5b01d2.

* [8.x] Adds PHP 8.1 support to serializable closures (laravel#38801)

* Makes serializable closures work with PHP 8.1

* Apply fixes from StyleCI

* Fixes PHP 7.3 tests

* Refactors

* Updates deprecated warning

Co-authored-by: Dries Vints <[email protected]>

* Fixes restoring properties

* Update QueueServiceProvider.php

Co-authored-by: Taylor Otwell <[email protected]>
Co-authored-by: Dries Vints <[email protected]>
Co-authored-by: Taylor Otwell <[email protected]>

* Fix default value

* Fix mb_strlen value

* Adds `continue-on-error` for PHP 8.1

* [8.x] Add explicit `@return` annotations in `{@inheritdoc}` from vendors and add some missing `#[\ReturnTypeWillChange]` (laravel#38819)

* Add explicit `@return` to `{@inheritdoc}` PHPDoc

* Use `return null;` when the return type is `null`

* Skips PHP 8.1 failing tests

* Skips some more PHP 8.1 related tests

* Skips some more PHP 8.1 related tests

* Skips some more PHP 8.1 related tests

* Skips some more PHP 8.1 related tests

* Skips some more PHP 8.1 related tests

* Skips some more PHP 8.1 related tests

* Skips some more PHP 8.1 related tests

* Update SerializableClosure.php

Co-authored-by: Graham Campbell <[email protected]>
Co-authored-by: Taylor Otwell <[email protected]>
Co-authored-by: Nuno Maduro <[email protected]>
Co-authored-by: Taylor Otwell <[email protected]>
Co-authored-by: Wouter J <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants